/* 整体布局 */
body {
    margin: 0;
    padding: 0;
    background: #f0f2f5;
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: #001529;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    margin: 0;
    font-size: 20px;
    color: #fff;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.menu-section {
    margin-bottom: 20px;
}

.menu-section h3 {
    padding: 0 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 10px;
}

.menu-item {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: all 0.3s;
}

.menu-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    color: #fff;
    background: #1890ff;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 主内容区样式 */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 20px;
    background: #f0f2f5;
}

.content-header {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-actions {
    display: flex;
    gap: 15px;
}

.add-btn {
    background: #1890ff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.add-btn:hover {
    background: #40a9ff;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    width: 200px;
}

.content-body {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.table th {
    background: #fafafa;
    font-weight: 500;
}

.table tr:hover {
    background: #fafafa;
}

/* 操作按钮样式 */
.action-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 8px;
    transition: all 0.2s ease;
}

.edit-btn {
    background: #faad14;
    color: white;
}

.edit-btn:hover {
    background: #ffc53d;
}

.delete-btn {
    background: #ff4d4f;
    color: white;
}

.delete-btn:hover {
    background: #ff7875;
}

.view-btn {
    background: #1890ff;
    color: white;
}

.view-btn:hover {
    background: #40a9ff;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: #fff;
    width: 600px;
    margin: 80px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    line-height: 1;
}

.close-btn:hover {
    color: #4b5563;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4b5563;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.form-control:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    height: 36px;
    min-width: 80px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* 文件上传样式 */
.image-preview {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.file-list {
    margin-top: 12px;
}

input[type="file"] {
    padding: 6px;
}

/* 评论管理特定样式 */
.table td {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table td button {
    white-space: nowrap;
}

/* 搜索框样式优化 */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 30px;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    width: 300px;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

/* 表格响应式布局 */
@media screen and (max-width: 768px) {
    .table {
        display: block;
        overflow-x: auto;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .search-box input:focus {
        width: 250px;
    }
} 

/* 表单操作按钮样式 */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    min-width: 80px;
    height: 32px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel {
    background: #f0f0f0;
    color: #666;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-confirm {
    background: #1890ff;
    color: white;
}

.btn-confirm:hover {
    background: #40a9ff;
}

/* 模态框内容样式 */
.modal-content {
    width: 400px;  /* 固定宽度 */
    margin: 100px auto;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    height: 32px;
    padding: 4px 11px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.form-control:focus {
    border-color: #40a9ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.5L1.5 4h9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    background: #f0f0f0;
    color: #666;
} 

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.edit-btn {
    background: #1890ff;
    color: white;
}

.delete-btn {
    background: #ff4d4f;
    color: white;
}

.view-btn {
    background: #52c41a;
    color: white;
}

.action-btn:hover {
    opacity: 0.8;
}

/* 附件徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
}

.photo-badge {
    background: #e6f7ff;
    color: #1890ff;
}

.file-badge {
    background: #f6ffed;
    color: #52c41a;
} 

/* 消息详情样式 */
.message-detail {
    padding: 20px;
}

.message-detail .message-meta {
    color: #666;
    margin-bottom: 15px;
}

.message-detail .message-content {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 图片容器和图片样式 */
.message-images {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin: 20px 0;
}

.message-images img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 4px;
    background: #f5f5f5;
    padding: 10px;
    box-sizing: border-box;
}

/* 图片预览遮罩层 */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    cursor: pointer;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

/* 文件列表样式 */
.message-files {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
}

.file-item:hover {
    background: #f0f0f0;
}

.file-icon {
    font-size: 20px;
} 